# -*- coding: utf-8 -*-
# @Time    : 2021/1/1 下午4:13
# @Author  : tgy


def test01():
    """
    for 从可迭代对象中获取每一项的值,如:
        str，list,dict,set

    字典for得到的是key
    """
    name = 'zhangsan'

    for n in name:
        print(n)

    names = list(('zhangsan', 'lisi', 'wangwu'))

    for name in names:
        print(name)

    person = dict(name='zhangsan', age=21)

    for key in person:
        print(key)


if __name__ == '__main__':
    ...
    test01()
